// 封装生成token
require('dotenv').config()
const jwt = require('jsonwebtoken')
function createToken(data) {
  return jwt.sign(data, process.env.JWT_SECRET, { expiresIn: process.env['TOKEN_EXPIRES'] })
}
module.exports = createToken
